local function Spellpower_statusdisplays(self)
	if self.owner:HasTag("musha") or self.owner:HasTag("spellpower") then
		local SpellpowerBadge = GLOBAL.require "widgets/spellpowerbadge"
		self.spellpower = self:AddChild(SpellpowerBadge(self.owner))
		self.owner.spellpowerbadge = self.spellpower
		self._custombadge = self.spellpower 
--改，重写坐标。By 青青草原扛把子
		local AlwaysOnStatus = false
		for k,v in ipairs(GLOBAL.KnownModIndex:GetModsToLoad()) do 
			local Mod = GLOBAL.KnownModIndex:GetModInfo(v).name
			if Mod == "Combined Status" or Mod == "新辅助合集" then 
				AlwaysOnStatus = true
			end
		end

		self.spellpower:SetPosition(-180,135,0)
		local heart = self.heart:GetPosition()
		if not AlwaysOnStatus and GetWorld():IsCave() then
		  self.spellpower:SetPosition(-180,heart.y,0)
		end

		local function OnSetPlayerMode(self)
			if self.onspellpowerdelta == nil then
				self.onspellpowerdelta = function(owner, data) self:SpellpowerDelta(data) end
				self.inst:ListenForEvent("spellpowerdelta", self.onspellpowerdelta, self.owner)
				if self.owner.components.spellpower ~= nil then
					self:SetSpellpowerPercent(self.owner.components.spellpower:GetPercent())
				end
			end
		end

		
		function self:SetSpellpowerPercent(pct)
			if self.owner.components.spellpower ~= nil then
				self.spellpower:SetPercent(pct, self.owner.components.spellpower.max)
			end
		end

		function self:SpellpowerDelta(data)
			self:SetSpellpowerPercent(data.newpercent)
		end

		OnSetPlayerMode(self)
	end
end
AddClassPostConstruct("widgets/statusdisplays", Spellpower_statusdisplays)